import 'package:flutter/material.dart';
import 'package:get/get.dart';

mixin ArgMixin<T extends StatefulWidget> on State<T> {

  bool _first = true;

  @override
  void didChangeDependencies() {
    // TODO: implement didChangeDependencies
    super.didChangeDependencies();
    if (_first) {
      _first = false;
      var arg = Get.arguments;
      if (arg is Map<String, dynamic>) {
        loadArg(arg);
      }
    }
  }

  void loadArg(Map<String, dynamic> arg);

}